Optimal. Leaf size=50 \[ -\frac{a^2}{2 x^2}-\frac{2 a b x^{n-2}}{2-n}-\frac{b^2 x^{-2 (1-n)}}{2 (1-n)} \]
[Out]
_______________________________________________________________________________________
Rubi [A] time = 0.0581579, antiderivative size = 50, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.077 \[ -\frac{a^2}{2 x^2}-\frac{2 a b x^{n-2}}{2-n}-\frac{b^2 x^{-2 (1-n)}}{2 (1-n)} \]
Antiderivative was successfully verified.
[In] Int[(a + b*x^n)^2/x^3,x]
[Out]
_______________________________________________________________________________________
Rubi in Sympy [A] time = 8.67337, size = 37, normalized size = 0.74 \[ - \frac{a^{2}}{2 x^{2}} - \frac{2 a b x^{n - 2}}{- n + 2} - \frac{b^{2} x^{2 n - 2}}{2 \left (- n + 1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] rubi_integrate((a+b*x**n)**2/x**3,x)
[Out]
_______________________________________________________________________________________
Mathematica [A] time = 0.0427123, size = 39, normalized size = 0.78 \[ \frac{-a^2+\frac{4 a b x^n}{n-2}+\frac{b^2 x^{2 n}}{n-1}}{2 x^2} \]
Antiderivative was successfully verified.
[In] Integrate[(a + b*x^n)^2/x^3,x]
[Out]
_______________________________________________________________________________________
Maple [A] time = 0.019, size = 42, normalized size = 0.8 \[{\frac{1}{{x}^{2}} \left ( -{\frac{{a}^{2}}{2}}+{\frac{{b}^{2} \left ({{\rm e}^{n\ln \left ( x \right ) }} \right ) ^{2}}{-2+2\,n}}+2\,{\frac{ab{{\rm e}^{n\ln \left ( x \right ) }}}{-2+n}} \right ) } \]
Verification of antiderivative is not currently implemented for this CAS.
[In] int((a+b*x^n)^2/x^3,x)
[Out]
_______________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((b*x^n + a)^2/x^3,x, algorithm="maxima")
[Out]
_______________________________________________________________________________________
Fricas [A] time = 0.239361, size = 89, normalized size = 1.78 \[ -\frac{a^{2} n^{2} - 3 \, a^{2} n + 2 \, a^{2} -{\left (b^{2} n - 2 \, b^{2}\right )} x^{2 \, n} - 4 \,{\left (a b n - a b\right )} x^{n}}{2 \,{\left (n^{2} - 3 \, n + 2\right )} x^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((b*x^n + a)^2/x^3,x, algorithm="fricas")
[Out]
_______________________________________________________________________________________
Sympy [A] time = 2.34751, size = 245, normalized size = 4.9 \[ \begin{cases} - \frac{a^{2}}{2 x^{2}} - \frac{2 a b}{x} + b^{2} \log{\left (x \right )} & \text{for}\: n = 1 \\- \frac{a^{2}}{2 x^{2}} + 2 a b \log{\left (x \right )} + \frac{b^{2} x^{2}}{2} & \text{for}\: n = 2 \\- \frac{a^{2} n^{2}}{2 n^{2} x^{2} - 6 n x^{2} + 4 x^{2}} + \frac{3 a^{2} n}{2 n^{2} x^{2} - 6 n x^{2} + 4 x^{2}} - \frac{2 a^{2}}{2 n^{2} x^{2} - 6 n x^{2} + 4 x^{2}} + \frac{4 a b n x^{n}}{2 n^{2} x^{2} - 6 n x^{2} + 4 x^{2}} - \frac{4 a b x^{n}}{2 n^{2} x^{2} - 6 n x^{2} + 4 x^{2}} + \frac{b^{2} n x^{2 n}}{2 n^{2} x^{2} - 6 n x^{2} + 4 x^{2}} - \frac{2 b^{2} x^{2 n}}{2 n^{2} x^{2} - 6 n x^{2} + 4 x^{2}} & \text{otherwise} \end{cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((a+b*x**n)**2/x**3,x)
[Out]
_______________________________________________________________________________________
GIAC/XCAS [F] time = 0., size = 0, normalized size = 0. \[ \int \frac{{\left (b x^{n} + a\right )}^{2}}{x^{3}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((b*x^n + a)^2/x^3,x, algorithm="giac")
[Out]